#ifndef LOGINCOMMAND_H
#define LOGINCOMMAND_H

#include <string>
#include "SepararString.h"
#include "StreamBloqueante.h"
#include "ABM_Properties.h"
#include <vector>
#include <fstream>

class LoginCommand {
private:
	bool f;
public:

	LoginCommand(){}

	~LoginCommand(){}

	void execute(std::string &usrV, std::string &passV){

		ABM_Properties prop(USERS);
		prop.LevantarFile();

		if(prop.SeEncuentra(usrV)){
			std::string pass = (prop.GetValueFromKey(usrV));
			if (pass == passV) f = false;
			else f = true;
		} else f = true;

	}

	bool fail(){
		return f;
	}
};

#endif
